
// A global object that can listen to property changes
window.wallpaperPropertyListener = {
    applyUserProperties: function(properties) {

        // Read scheme color
        if (properties.backgroundcolor) {
            // Convert the scheme color to be applied as a CSS style
            var schemeColor = properties.backgroundcolor.value.split(' ');
            schemeColor = schemeColor.map(function(c) {
                return Math.ceil(c * 255);
            });
            document.body.style.backgroundColor = 'rgb(' + schemeColor + ')';
        }

       /* if (properties.dotcolor) {
           
            var dotColors = properties.dotcolor.value.split(' ');
            dotColors = dotColors.map(function(c) {
                return Math.ceil(c * 255);
            
            // Convert the scheme color to be applied as a CSS style
            
                
            });
            //document.style.backgroundColor = 'rgb(' + dotColors + ')';
             var particleDebugElement = particleground(document.getElementById('particles'), {
                
            dotColor: 'rgb(' + dotColors + ')'
            //lineColor: '#19CCC2'
             });
             
            
        }
        if (properties.linecolor) {
           
            var lineColor = properties.linecolor.value.split(' ');
            lineColor = lineColor.map(function(c) {
                return Math.ceil(c * 255);
            
            // Convert the scheme color to be applied as a CSS style
            
                
            });
            //document.style.backgroundColor = 'rgb(' + dotColors + ')';
             var particleDebugElement = particleground(document.getElementById('particles'), {
                
            //dotColor: 'rgb(' + linecolor + ')',
            lineColor: 'rgb(' + lineColor + ')'
             });
             
            
        }*/
    }
};
